<!--
  User: Kuttubek Aidaraliev
  Date: 07.05.2010
  Time: 8:33:27
-->

<rich:dataTable
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
        xmlns:rich="http://richfaces.org/rich"
        xmlns:a4j="http://richfaces.org/a4j"
        value="#{contactPersons}"
                         var="contactPerson"
                         width="100%"
                         rowKeyVar="row"
                         id="#{id}">

             <rich:column>
                <f:facet name="header">
                    <h:outputText value="#{messages.fullName}" />
                </f:facet>
                <h:outputText value="#{contactPerson.fullName}" />
             </rich:column>

             <rich:column>
                <f:facet name="header">
                    <h:outputText value="#{messages.organization}"/>
                </f:facet>
                <h:outputText value="#{contactPerson.customer.officialName}" />
             </rich:column>

             <rich:column>
                <f:facet name="header">
                    <h:outputText value="#{messages.position}"/>
                </f:facet>
                <h:outputText value="#{contactPerson.position}" />
             </rich:column>

             <rich:column>
                <f:facet name="header">
                    <h:outputText value="#{messages.workPhone}"/>
                </f:facet>
                <h:outputText value="#{contactPerson.workPhone}" />
             </rich:column>

             <rich:column>
                <f:facet name="header">
                    <h:outputText value="#{messages.mobilePhone}"/>
                </f:facet>
                <h:outputText value="#{contactPerson.mobilePhone}" />
             </rich:column>

             <rich:column>
                <f:facet name="header">
                    <h:outputText value="#{messages.dateLastContact}"/>
                </f:facet>
                <h:outputText value="#{contactPerson.dateLastContact}" />
             </rich:column>

             <rich:column>
                <f:facet name="header">
                    <h:outputText value="#{messages.operation}"/>
                </f:facet>
                <ui:insert/>
             </rich:column>

             <!--<rich:column>
                <f:facet name="header">
                    <h:outputText value="#{messages.delete}"/>
                </f:facet>
                 <a4j:commandButton value="#{messages.delete}" action="#{applicantBeanController.deleted}" reRender="table">
                    <f:setPropertyActionListener value="#{applicant}"
                                                 target="#{applicantBeanController.applicant}" />
                </a4j:commandButton>

             </rich:column>-->

             <!--<f:facet name="footer">
                  <rich:datascroller for="applicantListBeanId" align="left" rendered="#{not empty applicantBeanController.applicantDataModel}"/>
             </f:facet>-->

         </rich:dataTable>